<template>
  <tr>
    <td>合计: </td>
    <td colspan="5">{{SumPrice}}</td>
  </tr>
</template>

<script>
export default {
  props:['sum'],
  computed:{
    SumPrice() {
      return this.sum.filter(item => item.checked).reduce((prve,item) =>{
        return prve += item.num*item.price
      } , 0)
    }
  }
}
</script>

<style></style>
